# -*- coding: utf-8 -*-
# @Time : 2021/9/9 21:52
# @Author : 伟哥
# @Email : xw@gmail.com
# @File : CRM-ST-XSJH-038.py
# @Project : crm
'''验证查看商机详细信息功能'''
from time import sleep
from selenium.webdriver.common.by import By
from selenium import webdriver
from utils.get_cookie import cookie
from utils import util

#定位器
chaqan_locator=(By.LINK_TEXT,"查看")

#前提条件

cookie=cookie(util.HOST,util.name,util.password)
driver=webdriver.Chrome()
driver.add_cookie(cookie)
driver.get('http://192.168.1.155/crm/index.php?m=business')

try:
    #点击查看
    driver.find_element(*chaqan_locator).click()

except Exception as e:
    raise e
finally:
    sleep(5)
    driver.quit()